//当前模块，api进行统一管理
import request from "./request"

//登录
export const reqLogin = (data) =>{
    return request({
        url:'/login',
        method:"post",
        data
    })
}

//登出
export const reqLogout = () =>{
    return request({
        url:'/logout',
        method:"post"
    })
}

//用户信息
export const reqUserInfo = () =>{
    return request({
        url:'/user/userInfo',
        method:"get"
    })
}

//文章查询
export const reqArticle = (params) =>{
    return request({
        url:'/article/articleList',
        method:"get",
        params
    })
}

//查询推荐文章
export const reqHotArticle = () =>{
    return request({
        url:'/article/hotArticleList',
        method:"get",

    })
}

//文章查询
export const reqArticleDetail = (id) =>{
    return request({
        url:'/article/'+ id,
        method:"get",

    })
}

//评论数据
export const reqArticleComment = (params) =>{
    return request({
        url:"/comment/commentList",
        method:"get",
        params

    })
}

//新增评论数据
export const reqAddComment = (data) =>{
    return request({
        url:"/comment",
        method:"POST",
        data

    })
}

//新增友链评论数据
export const reqAddFriendComment = (data) =>{
    return request({
        url:"/comment",
        method:"POST",
        data

    })
}



//新增友链评论数据
export const reqFriendComments = (params) =>{
    return request({
        url:"/comment/linkCommentList",
        method:"GET",
        params

    })
}

//文章查询
export const reqAtlas = (params) =>{
    return request({
        url:'/atlas/atlasList',
        method:"get",
        params
    })
}


